Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

633438 Views

Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/208 - Sorting visualizer

style.css cody/swapnilsparsh/30DaysOfJavaScript/208 - Sorting visualizer/style.css
107 Views
0 Comments
.bar {
padding: 10px 12px;
display: flex;
justify-content: center;
width: 25px;
background: rgb(224, 81, 172);
margin: 3px;
border: 3.5px solid rgb(23, 23, 24);
index.html cody/swapnilsparsh/30DaysOfJavaScript/208 - Sorting visualizer/index.html
290 Views
0 Comments
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./style.css" />
script.js cody/swapnilsparsh/30DaysOfJavaScript/208 - Sorting visualizer/script.js
160 Views
0 Comments
const n = 9; //number of bars to sort
const array = [];
init();

//generate random numbers
function init() {
for (let i = 0; i < n; i++) {
array[i] = Math.floor(Math.random() * (11 - 1) + 1);